<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui" template="/masterPage.xhtml"
	xmlns:f="http://java.sun.com/jsf/core">
	<ui:define name="content">
		<h:form id="genres_list_form">
			<p:growl id="messages" showDetail="true" sticky="true" />
			<p:toolbar id="toolbar" style="margin-top:20px; margin-bottom:5px">
				<p:toolbarGroup align="left">
					<p:commandButton value="Create"
						action="#{genresBean.showCreateDialog}" style="font-size: 85% !important"/>
				</p:toolbarGroup>
			</p:toolbar>

			<p:dataTable id="genresTable" var="genre"
				value="#{genresBean.genres}" rowKey="#{genre.id}"
				selection="#{genresBean.selectedGenre}" selectionMode="single">
				<p:column id="genre_id" headerText="ID" sortBy="#{genre.id}">
					<h:outputText value="#{genre.id}" />
				</p:column>
				<p:column id="genre_Name" headerText="Genre Name">
					<h:outputText value="#{genre.name}" />
				</p:column>
			</p:dataTable>
		</h:form>

		<h:form id="createdlg_form">
			<p:dialog id="createdlg" header="Create New Genre"
				widgetVar="createdlg" modal="true">
				<ui:include src="dialogs/newGenreDialog.xhtml"/>
			</p:dialog>
		</h:form>

		<h:form id="editdlg_form">
			<p:dialog id="editdlg" header="Edit Dialog" widgetVar="editdlg"
				modal="true">

			</p:dialog>
		</h:form>

		<h:form id="viewdlg_form">
			<p:dialog id="viewdlg" header="View Dialog" widgetVar="viewdlg"
				modal="true">
			</p:dialog>
		</h:form>
	</ui:define>
</ui:composition>
